package org.cainiao.servlet.storage.redis.dto;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * <br />
 * <p>
 * Author: Cai Niao(wdhlzd@163.com)<br />
 */
@Data
public class CnEntry implements Comparable<CnEntry>, Serializable {

    @Serial
    private static final long serialVersionUID = 4573875333092694406L;
    
    private String key;
    private Integer value;

    public CnEntry(String key, Integer value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public int compareTo(CnEntry o) {
        return key.compareTo(o.key);
    }
}
